package com.xju.subjectsystem.service;

import com.xju.subjectsystem.pojo.LoginInfo;
import com.xju.subjectsystem.pojo.Teacher;

import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Map;

/**
 * -*- coding:utf-8 -*-
 *
 * @projectName: Subjectsystem
 * @package: com.xju.subjectsystem.service
 * @className: TeacherService
 * @author: Eiard
 * @description: TODO : 
 * @date: 2024-12-03 19:42
 */
public interface TeacherService {

    /**
     * @methodName: selectByUsername
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 通过用户名查询
     * @author: Eiard
     * @date: 2024-12-11 14:46
     * @param: username  用户名
     * @return: Teacher
     */
    Teacher selectByUsername(String username);

    /**
     * @methodName: deleteByUsername
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 逻辑删除
     * @author: Eiard
     * @date: 2024-12-05 20:05
     * @param: username  用户名
     */
    void deleteByUsername(String username);

    /**
     * @methodName: add
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 添加教师(全参)
     * @author: Eiard
     * @date: 2024-12-05 17:33
     * @param: teacher
     */
    void add(Teacher teacher) throws NoSuchAlgorithmException;

    /**
     * @methodName: addSelective
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 选择添加(tno,tpwd,tname)必须不为空
     * @author: Eiard
     * @date: 2024-12-07 21:28
     * @param: teacher
     */
    void addSelective(Teacher teacher) throws NoSuchAlgorithmException;

    /**
     * @methodName: batchAddTeachers
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 批量添加教师
     * @author: Eiard
     * @date: 2024-12-07 22:17
     * @param: teacherList
     * @return: Map<List < String>>
     */
    Map<String, List<String>> batchAddTeachers(List<Teacher> teacherList);

    /**
     * @methodName: update
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 所有字段修改
     * @author: Eiard
     * @date: 2024-12-05 20:26
     * @param: teacher
     */
    void update(Teacher teacher);

    /**
     * @methodName: updateSelective
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 可选字段更新
     * @author: Eiard
     * @date: 2024-12-07 21:51
     * @param: teacher
     */
    void updateSelective(Teacher teacher);

    /**
     * @methodName: updateTeacher
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 更新密码、手机号、邮箱、微信、头像
     * @author: Eiard
     * @date: 2024-12-07 22:03
     * @param: teacher
     * @return: boolean
     */
    void updateTeacher(Teacher teacher);


    /**
     * @methodName: login
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 登录返回信息(实现手机号和用户名登录)
     * @author: Eiard
     * @date: 2024-12-05 21:36
     * @param: username     用户名或者手机号
     * @param: password     密码
     * @return: LoginInfo
     */
    LoginInfo login(String username, String password) throws NoSuchAlgorithmException;

}
